﻿#ifndef TREEWIDGET_H_
#define TREEWIDGET_H_

#include <QWidget>
#include <QTreeWidget>

class TreeWidget : public QTreeWidget
{
public:

	inline static int MenuRole = Qt::ItemDataRole::UserRole + 1;

	enum MainWindowType
	{
		UserManager,ReaderMananger,BookManager,CirculateManager,
		UserInput,UserModify,UserDel,UserShow,UserPasswordModify

	};



	TreeWidget(QWidget* parent = nullptr);

	void init();
	QTreeWidgetItem* createTreeWidgetItem(const QString& text, TreeWidget::MainWindowType menu, QTreeWidgetItem* parent_item = nullptr);

private:
	QTreeWidget* m_treewidget;
};
#endif // !TREEWIDGET_H_
